﻿using System;
using Castle.Windsor;
using DMS.BEs;
using DMS.Models;

namespace DMS.ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            IWindsorContainer container = new WindsorContainer("castle.cfg.xml");

            try
            {
                IInvoiceViewModel model = container.GetService<IInvoiceViewModel>();

                Invoice invoice = model.GetInvoiceById(1);

                if (invoice != null)
                    Console.WriteLine(invoice.ToString());
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
            Console.ReadKey();
        }
    }
}